Refreshes toolbar button that allows to show/hide columns.

<div class="definition">
    initColumnOnOff()
</div>

Returns <i>undefined</i>.

<h4>Description</h4>

Every time you add or remove columns to the grid, the drop down menu on the toolbar that allows to show/hide columns should be rebuilt. This
menu is built when grid is rendered, but not rebuilt when grid is refreshed. If you use
<a class="method" href="w2grid.addColumn">.addColumn()</a> or <a class="method" href="w2grid.removeColumn">.removeColumn()</a> it will
rebuild toolbar show/hide column button. However, if you do change <a class="method" href="w2grid.columns">.columns</a> array directly, you will
need to call <span class="argument">.initColumnOnOff()</span> method in addition to <a class="method" href="w2grid.columns">.refresh()</a>
method.
<div style="height: 10px"></div>

If you have grid defined in the following way:
<textarea class="javascript">
let grid = new w2grid({
    name     : 'grid',
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'lname', text: 'Last Name', size: '30%' },
        { field: 'fname', text: 'First Name', size: '30%' },
        { field: 'email', text: 'Email', size: '40%' },
        { field: 'sdate', text: 'Start Date', size: '120px' },
        { field: 'sdate', text: 'End Date', size: '120px' }
    ]
});
</textarea>

And if you change columns directly, you will need to:
<textarea class="javascript">
grid.columns.splice(0, 1);
grid.initColumnOnOff();
grid.refresh();
</textarea>
